package com.lframework.xingyun.basedata.mappers;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.lframework.starter.web.core.mapper.BaseMapper;
import com.lframework.xingyun.basedata.entity.MakeMethod;
import com.lframework.xingyun.basedata.vo.make.QueryMakeMethodVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 制作方法表 Mapper 接口
 * </p>
 *
 */
public interface MakeMethodMapper extends BaseMapper<MakeMethod> {

    /**
     * 查询列表
     * @param vo
     * @return
     */
    default IPage<MakeMethod> queryPage(@Param("vo") QueryMakeMethodVo vo) {
        return defaultJoinWrapper()
                .page(PageDTO.of(vo.getPageIndex(), vo.getPageSize()));
    }

    /**
     * 查询列表
     * @param vo
     * @return
     */
    default List<MakeMethod> queryList(@Param("vo") QueryMakeMethodVo vo) {
        return defaultJoinWrapper().list();
    }
}

